<!-- Local nav. -->
<kbn-top-nav name="visualize">
  <!-- Transcluded elements. -->
  <div data-transclude-slots>
    <!-- Breadcrumbs. -->
    <bread-crumbs
      data-transclude-slot="topLeftCorner"
      use-links="true"
      omit-current-page="true"
      page-title="'New'"
    ></bread-crumbs>
  </div>
</kbn-top-nav>

<div class="kuiViewContent kuiViewContent--constrainedWidth" data-test-subj="visualizeSelectTypePage">
  <div class="kuiViewContentItem">
    <!-- Header -->
    <div class="visualizeViewContentHeader kuiVerticalRhythm kuiVerticalRhythm--medium">
      <h1 class="kuiTitle">
        Select visualization type
      </h1>
    </div>

    <!-- Search -->
    <div class="kuiSearchInput kuiVerticalRhythm kuiVerticalRhythm--medium fullWidth" role="search">
      <div class="kuiSearchInput__icon kuiIcon fa-search"></div>
      <input
        class="kuiSearchInput__input"
        type="text"
        placeholder="Search visualization types..."
        ng-model="searchTerm"
      >
    </div>
    <div
      class="kuiVerticalRhythm kuiVerticalRhythm--medium"
      ng-repeat="category in filteredVisTypeCategories"
    >

      <!-- Title for each category -->
      <h2 class="kuiSubTitle kuiVerticalRhythm">
        {{ category.label }}
      </h2>

      <!-- Gallery of buttons for each vis type -->
      <div class="kuiGallery kuiVerticalRhythm">
        <a
          class="kuiGalleryItem"
          ng-repeat="type in category.list"
          ng-href="{{ getVisTypeUrl(type) }}"
          tooltip="{{ getVisTypeTooltip(type) }}"
          tooltip-placement="{{ getVisTypeTooltipPosition($parent.$index) }}"
          aria-describedby="visDescription_{{ ::getVisTypeId(type) }}"
        >
          <div class="kuiGalleryItem__image">
            <img
              ng-if="type.image"
              aria-hidden="true"
              ng-src="{{ type.image }}"
            />

            <!-- If there's no image, default to an icon, for BWC. -->
            <span
              ng-if="!type.image"
              aria-hidden="true"
              class="kuiIcon visualizeWizardVisTypeIcon"
              ng-class="type.icon"
            ></span>
          </div>

          <div
            class="kuiGalleryItem__label"
            data-test-subj="visualizeWizardChartTypeTitle"
          >
            {{ type.title }}
          </div>

          <div
            class="kuiGalleryItem__icon kuiIcon fa-flask"
            ng-if="type.shouldMarkAsExperimentalInUI()"
          ></div>

          <span
            class="euiScreenReaderOnly"
            aria-hidden="true"
            id="visDescription_{{ ::getVisTypeId(type) }}"
          >{{::getVisTypeTooltip(type)}}</span>
        </a>
      </div>
    </div>
  </div>
</div>
